package com.example.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.example.pojo.UserCreditScore;
import com.example.service.UserCreditScoreService;
import com.example.mapper.UserCreditScoreMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author Ansenown
* @description 针对表【user_credit_score(用户信用积分表)】的数据库操作Service实现
* @createDate 2025-05-04 16:02:53
*/
@Service
public class UserCreditScoreServiceImpl extends ServiceImpl<UserCreditScoreMapper, UserCreditScore>
    implements UserCreditScoreService{

    @Autowired
    private UserCreditScoreMapper creditScoreMapper;

    @Override
    public List<UserCreditScore> getCreditScoreListByUserId(List<Integer> takersId) {
        List<UserCreditScore> userCreditScoreList = creditScoreMapper.selectList(
                new QueryWrapper<UserCreditScore>().in("user_id",takersId)
        );

        return userCreditScoreList;
    }
}




